package com.weixing.mall.provider.controller.front;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.core.support.BaseController;
import com.weixing.mall.provider.model.vo.member.MemberOrderVo;
import com.weixing.mall.provider.service.IMemberOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 前端-会员订单相关接口
 *
 * @author  siashan
 * @since  2.0
 **/
@RestController
@RequestMapping("front/member/order")
public class FrontMemberOrderController extends BaseController {

    @Autowired
    private IMemberOrderService memberOrderService;


    /**
     * 会员未认领订单列表
     *
     * @apiNote 查询会员所有未认领订单包括正价和秒杀
     * @return 未认领订单列表
     */
    @GetMapping("/noclaim")
    public Result<IPage<MemberOrderVo>> noClaimOrders() {
        IPage<MemberOrderVo> page = memberOrderService.noClaimOrders(initMpPage());
        return ResultUtil.success(page);
    }

}
